<head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
    
    <p id="demo"></p>
    <script>
    var r=Math.random();
    var x=document.getElementById("demo")
    if (r>0.5){
        x.innerHTML="<a href='http://www.runoob.com'>访问菜鸟教程</a>";
    }
    else{
        x.innerHTML="<a href='http://wwf.org'>Visit WWF</a>";
    }
    </script>
    
    </body>
    </html>